import axios from "axios";
import { Message } from "element-ui";
import {setnullString} from "../config/config"
import { GetCookie } from "../config/config"
axios.interceptors.request.use(config => {
    if (GetCookie("token")) {
        config.headers["Authorization"] = GetCookie("token");
    }
    return config
})
axios.interceptors.response.use(res => { 
    return setnullString(res.data)
})
export default axios